﻿namespace RuoVea.Notes.Server.Models;

/// <summary>
/// 分类
/// </summary>
[SugarTable(nameof(NtCategory), "分类")]
public class NtCategory : EntityBase
{
    /// <summary>
    /// 分类名称
    /// </summary>
    [SugarColumn(ColumnDescription = "分类名称")]
    public string Name { get; set; }

    /// <summary>
    /// 父分类ID
    /// </summary>
    [SugarColumn(ColumnDescription = "父分类ID", IsNullable = true)]
    public int? PId { get; set; }

    /// <summary>
    /// 父分类
    /// </summary>
    [SugarColumn(IsIgnore = true)]
    public NtCategory PCategory { get; set; }

    /// <summary>
    /// 笔记与分类关联
    /// </summary>
    [SugarColumn(IsIgnore = true)]
    public NtCategory Categorie { get; set; }
}
